/**
 * Created by Mark_ren on 2016/11/7.
 * 苟富贵,無相忘
 */
var express = require('express');
var router = express.Router();
var co = require('co');
var seqModule = require('./createModules');
var seq = new seqModule();



//添加百问百答评论
router.get('/addAnswers', function(req, res, next) {
    co(function () {
        req.query.createTime=moment().format("YYYY-MM-DD HH:mm:ss");
        seq.answersModule.create(req.query).then(function(results){
            res.json({"success":true,"result":results});
        });
    }).catch(function(e) {
        res.json({'success':false,'msg':'添加失败'});
        console.log(e);
    })
});



module.exports = router;